package org.anddev.andengine.extra;

import android.media.AudioManager;

public class ExtVibration {
	
	public static void duration(int ms) {
		int mode = Enviroment.getInstance().getAudioManager().getRingerMode();
		
		if (mode >= AudioManager.RINGER_MODE_VIBRATE && Enviroment.getInstance().getVibro()) {
			try {
				Enviroment.getInstance().getEngine().vibrate(ms);
			} catch (Exception e) {
				
			}
		}
	}
	
}